﻿@model TelecomGis.Models.LoginModel

@{
    Layout = null;
    AjaxOptions ajaxOp = new AjaxOptions()
    {
        HttpMethod = "Post",
        OnComplete = "completedAjaxRequestLogin"
    };
}
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Đăng nhập hệ thống TelecomGis</title>
    <link href="~/Content/LoginNew.css" rel="stylesheet" />
    <link href="@Url.Content("~/Content/themes/base/jquery-ui.css")" rel="stylesheet" type="text/css" />
    <link href="http://fonts.googleapis.com/css?family=Droid+Sans:regular,bold|PT+Sans+Narrow:regular,bold|Droid+Serif:iamp;v1"
        rel="stylesheet" type="text/css">
    <!-- Scripts -->
    <script src="@Url.Content("~/Scripts/jquery-1.8.2.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery-ui-1.8.24.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.unobtrusive-ajax.min.js")" type="text/javascript"></script>
    <!-- Forms Elemets -->
    <link href="~/Scripts/jquery-loadmask/jquery.loadmask.css" rel="stylesheet" />
    <script src="~/Scripts/jquery-loadmask/jquery.loadmask.js"></script>

</head>
<body>
    <header>
        <div class="logo">
            <img src="~/Content/images/logoVNPT.gif" width="300" />

        </div>
        <div class="content_h1">
            <h2 class="h2_toppage">VIỄN THÔNG CẦN THƠ</h2>
            <h1 class="h1_toppage">HỆ THỐNG QUẢN LÝ CSHT MẠNG VIỄN THÔNG  </h1>
        </div>
        <div class="clear"></div>

    </header>
    <div style="clear: both"></div>
    <article>
        @Html.Action("SildeLogin", "Account", null)
        <div class="from_login">

            <div class="imagesSologan">

                 <h2 class="h2_support">Thông tin hỗ trợ</h2>
                    <ul class="infosup">
                        @*<li>
                            <img src="~/Content/images/trans.gif" title="" alt="" class="imgsv sv2">
                            <span class="info">
                                <h2>
                                    Hệ thống sử dụng font unicode</h2>
                                <p>
                                    Vui lòng chọn mã Unicode trong phần mềm unikey.</p>
                            </span>

                        </li>*@
                        <li>
                            <img src="~/Content/images/trans.gif" title="" alt="" class="imgsv sv2">
                            <span class="info">
                                <h2>
                                    Hệ thống hỗ trợ hầu hết mọi trình duyệt</h2>
                                <p>
                                   Khuyến khích : sử dụng trình duyện Google Chorme</p>
                            </span>

                        </li>
                        <li>
                            <img src="~/Content/images/trans.gif" title="" alt="" class="imgsv sv2">
                            <span class="info">
                                <h2>
                                    Hỗ trợ độ phân giải từ 1024 x 768</h2>
                                <p>
                                   Khuyến khích : sử dụng màn hình 1280 x 768</p>
                            </span>

                        </li>
                        <li>
                            <img src="~/Content/images/trans.gif" title="" alt="" class="imgsv sv2">
                            <span class="info">
                                <h2>
                                   Tổng đài hỗ trợ từ xa</h2>
                                <p>
                                   Mr. Huấn : 091 373 7372 </p>
                            </span>

                        </li>
                    </ul>

            </div>
            <div class="loginFrom">

                <div class="panel">
                    <div class="title_loginFrom">
                        <h4>Đăng nhập hệ thống</h4>
                        <div class="option">
                        </div>
                    </div>
                    <div class="content cotent_login">
                        <!-- ## Panel Content  -->
                        <script type="text/javascript">

                            function makeloading() {
                                $(".cotent_login").mask("Dữ liệu đang xử lý...");
                            }

                            _subdomainMain = "";

                            function completedAjaxRequestLogin(obj) {

                                var returnObj = eval('(' + obj.responseText + ')');

                                if (returnObj.Status == "success") {

                                    setTimeout(function () { $(".panel-login").unmask(); }, 2000);

                                    if (returnObj.Message != null) {
                                        makeSuccessHighlight(returnObj.Message);
                                    }
                                    else if (returnObj.RedirectUrl != null) {



                                        window.location.href = _subdomainMain + returnObj.RedirectUrl;
                                    }
                                } else {

                                    $(".cotent_login").unmask();
                                    makeErrorHighlight(returnObj.Message);
                                }



                                return false;
                            }

                            function makeErrorHighlight(messageStr) {
                                var $highlight = $("<div style='padding: 0.7em; margin-bottom:5px; width: inherit;'><p><span class='ui-icon ui-icon-alert' style='float: left; margin-right: .3em;'></span><strong>Alert: </strong>" + messageStr + "</p></div>");
                                $highlight.addClass("ui-state-highlight ui-corner-all");
                                $highlight.prependTo(".warning-area");
                                $highlight.delay(4500).fadeOut(1500);
                            }

                            function makeSuccessHighlight(messageStr) {
                                var $highlight = $("<div style='padding: 0.7em; margin-bottom:5px; width: inherit;'><p><span class='ui-icon ui-icon-info' style='float: left; margin-right: .3em;'></span><strong>Success: </strong>" + messageStr + "</p></div>");
                                $highlight.addClass("ui-state-highlight ui-corner-all");
                                $highlight.prependTo(".warning-area");
                                $highlight.delay(4500).fadeOut(1500);
                            }


                        </script>
                        @using (Ajax.BeginForm("Login", "Account", null, ajaxOp, new { enctype = "multipart/form-data" }))
                        {
                            //@Html.HiddenFor(model => model.ReturnUrl)
                            <div class="warning-area">
                            </div>
                            <div>
                                <span class="spanTitleUnput">Tên đăng nhập</span>&nbsp;&nbsp;&nbsp;&nbsp;
                                @Html.TextBoxFor(model => model.UserName, new { @class="inputform", @style = "text-transform: uppercase; margin-left:2px", @placeholder = "" })
                            </div>
                            <div>
                                <span class="spanTitleUnput">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Mật Khẩu</span>&nbsp;&nbsp;&nbsp;&nbsp;
                                @Html.PasswordFor(model => model.Password, new { @class="inputform", @placeholder = "" })
                            </div>
                            <div style="padding: 10px 0px 0px 105px;">
                                <input type="submit" onclick="return makeloading();" style="cursor: pointer" class="button-blue submit" value="Đăng nhập" />
                            </div>
                        }
                        <!-- ## / Panel Content  -->
                    </div>
                </div>

            </div>

        </div>
    </article>
    <div style="clear: both"></div>
    <footer>
        <h2>COPYRIGHT (C) 2014 TRUNG TÂM VIỄN THÔNG 1. DESIGN BY TỔ KỸ THUẬT 1</h2>
    </footer>
</body>
</html>
